<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Checking and Configuring the Open State of the Oracle Database">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002199998065.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000002164597290">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Checking and Configuring the Open State of the Oracle Database</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000002164597290"></a><a name="EN-US_TOPIC_0000002164597290"></a>

<h1 class="topictitle1">Checking and Configuring the Open State of the Oracle Database</h1>
<div><p>Ensure that the host where the Oracle database is located has been started before backup. For the primary/standby deployment mode using Data Guard (DG), the Oracle database to be protected at the standby end must be in the Mounted state. For other deployment modes, the Oracle database to be protected must be in the Open state. The following procedure describes how to check and configure the state of the Oracle database.</p>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Log in to the Oracle database host.</span><p><ul id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597202_en-us_topic_0000001656760969_ul1983714162204"><li id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597202_en-us_topic_0000001656760969_li7258697580">If the Linux OS is used, use PuTTY to log in to the Oracle database host and run the <strong id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597202_b14682476107">su - oracle</strong> command to switch to user <strong id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597202_b1646874718106">oracle</strong>.</li><li id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597202_en-us_topic_0000001656760969_li1366015032013">If the Windows OS is used, log in to the Oracle database host as the system administrator.</li></ul>
</p></li><li><span>Query the database installation user and instance name.</span><p><ul><li>If the Linux OS is used, perform the following operations:<ol type="a"><li>Use PuTTY to log in to the Oracle database host.</li><li>Run the following command to query the name of the user who installs the database:<pre class="screen">ps -ef | grep pmon</pre>
<p>The command output similar to the following is displayed. The user in the row where <em>xxx</em><strong>_pmon_hwdb</strong> is located is the user who installs the database. <strong>hwdb</strong> in <em>xxx</em><strong>_pmon_hwdb</strong> is the database instance name. User <strong>oracle</strong> is used as an example in the subsequent operations.</p>
<p><span><img src="en-us_image_0000002199963853.png"></span></p>
</li></ol>
</li><li>If the Windows OS is used, perform the following operations:<ol type="a"><li>Log in to the Oracle database host as the system administrator.</li><li>Press <span class="uicontrol" id="EN-US_TOPIC_0000002164597290__en-us_topic_0000001656760969_uicontrol11819941114510"><b>Win+R</b></span> to open the <strong id="EN-US_TOPIC_0000002164597290__en-us_topic_0000001656760969_b1015191219408">Run</strong> window.</li><li>Enter <span class="parmvalue"><b>regedit</b></span> to open the registry.</li><li>Obtain the corresponding value from the <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDB</strong><em>19Home1</em> path.<div class="p">The database installation username is obtained from the value of <span class="parmname"><b>ORACLE_GROUP_NAME</b></span>, and the database instance name is the value of <span class="parmname"><b>ORACLE_SID</b></span>.<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p><em>19Home1</em> in the path is only an example. Replace it with the actual one.</p>
</div></div>
</div>
<p><span><img src="en-us_image_0000002199998277.png"></span></p>
</li></ol>
</li></ul>
</p></li><li id="EN-US_TOPIC_0000002164597290__li14919010154311"><a name="EN-US_TOPIC_0000002164597290__li14919010154311"></a><a name="li14919010154311"></a><span>Run the following command to check whether the database is started.</span><p><ul><li>If the Linux OS is used, run the following command:<p><strong>ps -ef|grep ora</strong></p>
<p>If information similar to the following is displayed and contains the <strong>ora_</strong><strong><em>xx</em></strong> process, the database has been started:</p>
<pre class="screen">[oracle@18csingle45 ~]$ ps -ef|grep ora
oracle    76403      1  0 12:56 ?        00:00:10 ora_m002_orcl
oracle   159932      1  0 14:20 ?        00:00:05 ora_m003_orcl
oracle   175468      1  0 Apr07 ?        00:00:12 ora_pmon_orcl
oracle   175470      1  0 Apr07 ?        00:00:05 ora_clmn_orcl
oracle   175472      1  0 Apr07 ?        00:00:26 ora_psp0_orcl
oracle   175474      1  0 Apr07 ?        00:40:42 ora_vktm_orcl
oracle   175478      1  0 Apr07 ?        00:00:08 ora_gen0_orcl
oracle   175481      1  0 Apr07 ?        00:00:04 ora_mman_orcl
oracle   175485      1  0 Apr07 ?        00:00:50 ora_gen1_orcl
oracle   175488      1  0 Apr07 ?        00:00:09 ora_diag_orcl
oracle   175490      1  0 Apr07 ?        00:00:04 ora_ofsd_orcl
oracle   175493      1  0 Apr07 ?        00:01:27 ora_dbrm_orcl
oracle   175495      1  0 Apr07 ?        00:02:32 ora_vkrm_orcl
oracle   175497      1  0 Apr07 ?        00:00:09 ora_svcb_orcl
oracle   175499      1  0 Apr07 ?        00:00:25 ora_pman_orcl
oracle   175501      1  0 Apr07 ?        00:02:35 ora_dia0_orcl
oracle   175503      1  0 Apr07 ?        00:00:19 ora_dbw0_orcl
oracle   175505      1  0 Apr07 ?        00:00:13 ora_lgwr_orcl
oracle   175507      1  0 Apr07 ?        00:00:35 ora_ckpt_orcl
oracle   175509      1  0 Apr07 ?        00:00:02 ora_lg00_orcl
oracle   175511      1  0 Apr07 ?        00:00:06 ora_smon_orcl
oracle   175513      1  0 Apr07 ?        00:00:01 ora_lg01_orcl
oracle   175515      1  0 Apr07 ?        00:00:18 ora_smco_orcl
oracle   175517      1  0 Apr07 ?        00:00:04 ora_w000_orcl
oracle   175519      1  0 Apr07 ?        00:00:02 ora_reco_orcl
oracle   175521      1  0 Apr07 ?        00:00:04 ora_w001_orcl
oracle   175523      1  0 Apr07 ?        00:00:17 ora_lreg_orcl
oracle   175525      1  0 Apr07 ?        00:00:04 ora_pxmn_orcl
oracle   175529      1  0 Apr07 ?        00:01:05 ora_mmon_orcl
oracle   175531      1  0 Apr07 ?        00:01:02 ora_mmnl_orcl
oracle   175533      1  0 Apr07 ?        00:00:02 ora_d000_orcl
oracle   175535      1  0 Apr07 ?        00:00:02 ora_s000_orcl
oracle   175537      1  0 Apr07 ?        00:00:03 ora_tmon_orcl
oracle   177437      1  0 Apr07 ?        00:00:02 ora_arc0_orcl
oracle   177439      1  0 Apr07 ?        00:00:02 ora_tt00_orcl
oracle   177441      1  0 Apr07 ?        00:00:02 ora_tt01_orcl
oracle   177444      1  0 Apr07 ?        00:00:02 ora_arc1_orcl
oracle   177450      1  0 Apr07 ?        00:00:02 ora_arc2_orcl
oracle   177457      1  0 Apr07 ?        00:00:02 ora_arc3_orcl
oracle   177459      1  0 Apr07 ?        00:00:07 ora_tt02_orcl
oracle   177483      1  0 Apr07 ?        00:00:02 ora_aqpc_orcl
oracle   177494      1  0 Apr07 ?        00:00:04 ora_w002_orcl
oracle   177499      1  0 Apr07 ?        00:00:07 ora_p000_orcl
oracle   177501      1  0 Apr07 ?        00:00:07 ora_p001_orcl
oracle   177503      1  0 Apr07 ?        00:00:07 ora_p002_orcl
oracle   177505      1  0 Apr07 ?        00:00:07 ora_p003_orcl
oracle   177507      1  0 Apr07 ?        00:03:35 ora_cjq0_orcl
oracle   178617      1  0 Apr07 ?        00:00:04 ora_w003_orcl
oracle   179771      1  0 Apr07 ?        00:00:04 ora_w004_orcl
oracle   179794      1  0 Apr07 ?        00:00:02 ora_qm02_orcl
oracle   179800      1  0 Apr07 ?        00:00:03 ora_q002_orcl
oracle   179804      1  0 Apr07 ?        00:00:02 ora_q003_orcl
root     184058 183212  0 14:45 pts/0    00:00:00 su - oracle
oracle   184059 184058  0 14:45 pts/0    00:00:00 -bash
oracle   186418      1  0 14:46 ?        00:00:01 ora_m005_orcl
root     186471 184059  0 14:46 pts/0    00:00:00 su - oracle
oracle   186475 186471  0 14:46 pts/0    00:00:00 -bash
oracle   191769      1  0 Apr07 ?        00:00:05 ora_w005_orcl
oracle   191773      1  0 Apr07 ?        00:00:04 ora_w006_orcl
oracle   191812      1  0 Apr07 ?        00:00:04 ora_w007_orcl
oracle   195441      1  0 14:55 ?        00:00:00 ora_m000_orcl
oracle   198133 239014  0 14:58 pts/1    00:00:00 sqlplus
oracle   198175 198133  0 14:58 ?        00:00:00 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle   213064 186475  0 15:13 pts/0    00:00:00 ps -ef
oracle   213065 186475  0 15:13 pts/0    00:00:00 grep --color=auto ora
root     239013  10102  0 Apr07 pts/1    00:00:00 su - oracle
oracle   239014 239013  0 Apr07 pts/1    00:00:00 -bash</pre>
</li><li>If the Windows OS is used, perform the following operations:<ol type="a"><li id="EN-US_TOPIC_0000002164597290__li17364121904519">Press <span class="uicontrol" id="EN-US_TOPIC_0000002164597290__uicontrol11819941114510"><b>Win+R</b></span> to open the <strong id="EN-US_TOPIC_0000002164597290__b1015191219408">Run</strong> window.</li><li>Enter <span class="parmvalue"><b>services.msc</b></span> to go to the service page and check the service status.<p>If the status of the OracleService<em>XXX</em> service is <strong>Running</strong>, the database has been started.</p>
</li></ol>
</li></ul>
</p></li><li id="EN-US_TOPIC_0000002164597290__li14572194814339"><span>Run the following commands to log in to the Oracle database instance.</span><p><ul id="EN-US_TOPIC_0000002164597290__ul7420345341"><li id="EN-US_TOPIC_0000002164597290__li15682124913711">OS authentication:<ul id="EN-US_TOPIC_0000002164597290__ul89443983816"><li id="EN-US_TOPIC_0000002164597290__li18420124173415">If the Linux OS is used, run the following commands:<p id="EN-US_TOPIC_0000002164597290__p95148598366"><a name="EN-US_TOPIC_0000002164597290__li18420124173415"></a><a name="li18420124173415"></a><strong id="EN-US_TOPIC_0000002164597290__b14236563719">export ORACLE_SID=</strong><em id="EN-US_TOPIC_0000002164597290__i85144598369">Database instance name</em></p>
<p id="EN-US_TOPIC_0000002164597290__p145141259153613"><strong id="EN-US_TOPIC_0000002164597290__b1597618293715">sqlplus / as sysdba</strong></p>
</li><li id="EN-US_TOPIC_0000002164597290__li7402151163816">If the Windows OS is used, perform the following operations:<ol type="a" id="EN-US_TOPIC_0000002164597290__ol124110408264"><li id="EN-US_TOPIC_0000002164597290__li624120402267">Press <span class="uicontrol" id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597290_uicontrol11819941114510"><b>Win+R</b></span> to open the <strong id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597290_b1015191219408">Run</strong> window.</li><li id="EN-US_TOPIC_0000002164597290__li161821338277">Enter <span class="parmvalue" id="EN-US_TOPIC_0000002164597290__parmvalue122291222476"><b>cmd</b></span> and run the following commands:<p id="EN-US_TOPIC_0000002164597290__p1755152313372"><strong id="EN-US_TOPIC_0000002164597290__b19591532143713">set ORACLE_SID=</strong><em id="EN-US_TOPIC_0000002164597290__i16755423133718">Database instance name</em></p>
<p id="EN-US_TOPIC_0000002164597290__p1075515234379"><strong id="EN-US_TOPIC_0000002164597290__b540852910371">sqlplus / as sysdba</strong></p>
</li></ol>
</li></ul>
</li><li id="EN-US_TOPIC_0000002164597290__li105571236103417">Database authentication:<ul id="EN-US_TOPIC_0000002164597290__ul1136516538386"><li id="EN-US_TOPIC_0000002164597290__li1723334817382">If the Linux OS is used, run the following commands:<p id="EN-US_TOPIC_0000002164597290__p920984963717"><a name="EN-US_TOPIC_0000002164597290__li1723334817382"></a><a name="li1723334817382"></a><strong id="EN-US_TOPIC_0000002164597290__b162511338427">export ORACLE_SID=</strong><em id="EN-US_TOPIC_0000002164597290__i142521037423">Database instance name</em></p>
<p id="EN-US_TOPIC_0000002164597290__p182093496371"><strong id="EN-US_TOPIC_0000002164597290__b034785743716">sqlplus</strong></p>
<p id="EN-US_TOPIC_0000002164597290__p17915722412">Enter the name of a user with the <strong id="EN-US_TOPIC_0000002164597290__b0440649114212">sysdba</strong> permissions as prompted:</p>
<pre class="screen" id="EN-US_TOPIC_0000002164597290__screen9915112104114"><em id="EN-US_TOPIC_0000002164597290__i1915102164113">username </em>as sysdba</pre>
<p id="EN-US_TOPIC_0000002164597290__p159150224117">Enter the password as prompted.</p>
</li><li id="EN-US_TOPIC_0000002164597290__li122822426407">If the Windows OS is used, perform the following operations:<ol type="a" id="EN-US_TOPIC_0000002164597290__ol587720252273"><li id="EN-US_TOPIC_0000002164597290__li5168124414479">Press <span class="uicontrol" id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597290_uicontrol11819941114510_1"><b>Win+R</b></span> to open the <strong id="EN-US_TOPIC_0000002164597290__en-us_topic_0000002164597290_b1015191219408_1">Run</strong> window.</li><li id="EN-US_TOPIC_0000002164597290__li3877172517270">Enter <span class="parmvalue" id="EN-US_TOPIC_0000002164597290__parmvalue89061315114212"><b>cmd</b></span> and run the following commands:<p id="EN-US_TOPIC_0000002164597290__p8745723103813"><strong id="EN-US_TOPIC_0000002164597290__b0361183517422">set ORACLE_SID=</strong><em id="EN-US_TOPIC_0000002164597290__i8361163518426">Database instance name</em></p>
<p id="EN-US_TOPIC_0000002164597290__p15745182333814"><strong id="EN-US_TOPIC_0000002164597290__b11154427163811">sqlplus</strong></p>
<p id="EN-US_TOPIC_0000002164597290__p71274192512">Enter the name of a user with the <strong id="EN-US_TOPIC_0000002164597290__b330420012221">sysdba</strong> permissions as prompted:</p>
<pre class="screen" id="EN-US_TOPIC_0000002164597290__screen18896121620243"><em id="EN-US_TOPIC_0000002164597290__i380114413256">username </em>as sysdba</pre>
<p id="EN-US_TOPIC_0000002164597290__p15251105852511">Enter the password as prompted.</p>
</li></ol>
</li></ul>
</li></ul>
</p></li><li><span>If it is detected in <a href="#EN-US_TOPIC_0000002164597290__li14919010154311">3</a> that the database process is not started, run the following command on the database node to be protected to start the database process. Otherwise, skip this step.</span><p><p><strong>startup;</strong></p>
</p></li><li><span>Run the following command to check the status of the database to be protected:</span><p><p><strong>select instance_name,status from v$instance;</strong></p>
<ul><li>If the value of <span class="parmname"><b>STATUS</b></span> is <span class="parmvalue"><b>open</b></span> in the command output, the database is in the Open state.</li><li>If the value of <span class="parmname"><b>STATUS</b></span> is not <span class="parmvalue"><b>open</b></span> in the command output, contact the administrator to enable the database to be in the open state and then back up the database.<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p>For the primary/standby deployment mode using DG, <span class="parmname"><b>STATUS</b></span> must be <strong>MOUNTED</strong> in the command output for the Oracle database to be protected at the standby end.</p>
</div></div>
</li></ul>
<pre class="screen">SQL&gt; select instance_name,status from v$instance; 
 INSTANCE_NAME    STATUS 
 ---------------- ------------ 
 orcl            open</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000002199998065.html">Step 1: Checking and Configuring the Database Environment</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>